package com.magicroot.init.simple;

import com.minotauro.cleda.model.CledaConnector;
import com.minotauro.menu.loader.MenuLoader;
import com.minotauro.user.loader.PrivLoader;
import com.minotauro.user.loader.ProfLoader;
import com.minotauro.user.loader.RoleLoader;
import com.minotauro.user.loader.UserLoader;
import com.minotauro.workflow.loaders.DocTypeLoader;
import com.minotauro.workflow.loaders.NetPetriLoader;
import com.minotauro.workflow.loaders.WorklistLoader;

public class LoadData {

  public static void main(String[] args) throws Exception {
	   CledaConnector.getInstance().dropDB();

	 
	    PrivLoader.loadPriv(LoadData.class.getResourceAsStream("priv.xml"));
	    RoleLoader.loadRole(LoadData.class.getResourceAsStream("role.xml"));
	    ProfLoader.loadProf(LoadData.class.getResourceAsStream("prof.xml"));
	    UserLoader.loadUser(LoadData.class.getResourceAsStream("user.xml"));

	    WorklistLoader.loadWorklist(LoadData.class.getResourceAsStream("net_worklist.xml"));

	    PrivLoader.loadPriv(LoadData.class.getResourceAsStream("net_reclamo_priv.xml"));
	    RoleLoader.loadRole(LoadData.class.getResourceAsStream("net_reclamo_role.xml"));
	    ProfLoader.loadProf(LoadData.class.getResourceAsStream("net_reclamo_prof.xml"));
	    UserLoader.loadUser(LoadData.class.getResourceAsStream("net_reclamo_user.xml"));

	   DocTypeLoader.loadDocType(LoadData.class.getResourceAsStream("net_reclamo_doc.xml"));
	    NetPetriLoader.loadNetPetri(LoadData.class.getResourceAsStream("reclamo_net-petri.xml"));


	    MenuLoader.loadMenu(LoadData.class.getResourceAsStream("menu.xml"));
	    MenuLoader.loadMenu(LoadData.class.getResourceAsStream("net_reclamo_menu.xml"));

  }
}
